<%-- 
    Document   : edit
    Created on : May 5, 2011, 9:18:50 PM
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
          
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link type="text/css" rel="stylesheet" href="style.css" />
        <title>Vytvorenie položky - ODSKartW</title>
    </head>
    <body>
        <h1>Editácia položky</h1>
        <div>
            <h2>Názov záložky: <c:out value="${categoryTitle}" /></h2>
            <h2>Id = <c:out value="${medium.ID}" /></h2>
            <c:if test="${not empty error}">
                <div id="error">
                <c:out value="${error}"/>
            </div>
            </c:if>
            <form name="addingForm" action="${pageContext.request.contextPath}/EditMedium" method="post">
                <table>
                    <c:forEach items="${textFiller}" var="attribute">
                        <tr>
                            <td><c:out value="${attribute.header}" /></td>
                            <td><input type="text" name="${attribute.header}" value="${attribute.value}"></input><br /></td>
                        </tr>
                    </c:forEach>
                    <tr>
                        <td>&nbsp;</td>
                        <td><input type="submit" name="submit" value="Uprav" />
                            <input type="submit" name="submit" value="Zruš" />
                            <input type="submit" name="submit" value="Vymaž z databázy" />
                        </td>
                    </tr>
                </table> 
                <input type="hidden" name="categoryTitle" value="${categoryTitle}" />
                <input type="hidden" name="Id" value="${medium.ID}"/>
            </form>
        </div>
    </body>
</html>
